package cn.silver.module.message.bean;

import cn.silver.framework.core.utils.DateUtils;
import cn.silver.framework.tenant.model.TenantBean;
import cn.silver.module.message.domain.MsgNotice;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;


/**
 * 通知公告视图对象 sys_notice
 *
 * @author Michelle.Chung
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = MsgNotice.class)
@Schema(name = "NoticeBean", title = "消息管理-站内消息对象")
public class NoticeBean extends TenantBean implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 公告ID
     */
    @Schema(title = "公告类型")
    private String type;

    /**
     * 公告标题
     */
    @Schema(title = "公告标题")
    private String subject;

    /**
     * 公告内容
     */
    @Schema(title = "公告内容")
    private String content;

    /**
     * 消息类别
     */
    @Schema(title = "消息类别")
    private String category;

    /**
     * 业务主键
     */
    @Schema(title = "业务主键")
    private String busId;

    /**
     * 处理地址
     */
    @Schema(title = "处理地址")
    private String busUrl;

    /**
     * 发布时间
     */
    @Schema(title = "发布时间")
    @JsonFormat(timezone = DateUtils.TIME_ZONE, pattern = DateUtils.YYYY_MM_DD_HH_MM_SS)
    private Date publishTime;
}
